﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


namespace PRT
{
    public class OpenCall : IComparable
    {
        public string CID;
        public string DID;
        public int CallID;
        public DateTime TimeStamp;
        public string CallerName = "";
        public string CallerNumber = "";
        public string CallerAddress = "";
        public string Message = "";
        /*
        public OpenCall(string _CID, string _DID)
        {
            CID = _CID;
            DID = _DID;
            id = CID + "-" + DID;
        }
        */
        public OpenCall(string _CID, string _DID, int _CallID)
        {
            CID = _CID;
            DID = _DID;
            CallID = _CallID;
            TimeStamp = DateTime.Now;
        }

        public override string ToString()
        {
            return "CID:" + CID + " DID:" + DID + " CallID: " + CallID + " TimeStamp: " + TimeStamp;
        }


        public int CompareTo(object obj)
        {
            OpenCall otherCall = (OpenCall)obj;
            return this.CallID.CompareTo(otherCall.CID);
        }
    }
}